home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue64 / System / DummyForm.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-10-25  |  2.4 KB  |  99 lines

  1. unit DummyForm;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls, Menus, ActnList, ImgList, ComCtrls, ExtCtrls, DeskUtil, DeskForm, DockForm, DockToolForm, IDECommandButton;
  8.  
  9. type
  10.   TDummyExpert = class(TDockableToolBarForm)
  11.     ToolImages: TImageList;
  12.     TreeImages: TImageList;
  13.     ActionList2: TActionList;
  14.     CompileAction: TAction;
  15.     AddAction: TAction;
  16.     RemoveAction: TAction;
  17.     OptionsAction: TAction;
  18.     InstallAction: TAction;
  19.     UpdateAction: TAction;
  20.     StatusbarCmd: TAction;
  21.     StatusBarContents: TAction;
  22.     procedure FormCreate(Sender: TObject);
  23.   private
  24.     { Private declarations }
  25.   public
  26.     { Public declarations }
  27.   end;
  28.  
  29. procedure InvokeDummyExpert;
  30.  
  31. implementation
  32.  
  33. {$R *.DFM}
  34.  
  35. procedure InvokeDummyExpert;
  36. begin
  37.     TDummyExpert.Create (Application).Show;
  38. end;
  39.  
  40. procedure TDummyExpert.FormCreate(Sender: TObject);
  41. begin
  42.     DeskSection := 'DummyExpert';
  43.     Inherited FormCreate (Sender);
  44.     ToolBar1.Images := ToolImages;
  45.  
  46.     // Create some buttons in the toolbar as per Package Editor
  47.  
  48.     with TCommandButton.Create (ToolBar1) do begin
  49.         Parent := ToolBar1;
  50.         Left := 4;  Top := 0;  Width := 56;  Height := 36;
  51.         Action := CompileAction;
  52.         Images := ToolImages;
  53.         ShowCaption := True;
  54.     end;
  55.  
  56.     with TCommandButton.Create (ToolBar1) do begin
  57.         Parent := ToolBar1;
  58.         Left := 68;  Top := 0;  Width := 56;  Height := 36;
  59.         Action := AddAction;
  60.         Images := ToolImages;
  61.         ShowCaption := True;
  62.     end;
  63.  
  64.     with TCommandButton.Create (ToolBar1) do begin
  65.         Parent := ToolBar1;
  66.         Left := 124;  Top := 0;  Width := 56;  Height := 36;
  67.         Action := RemoveAction;
  68.         Images := ToolImages;
  69.         ShowCaption := True;
  70.     end;
  71.  
  72.     with TCommandButton.Create (ToolBar1) do begin
  73.         Parent := ToolBar1;
  74.         Left := 188;  Top := 0;  Width := 56;  Height := 36;
  75.         Action := InstallAction;
  76.         Images := ToolImages;
  77.         ShowCaption := True;
  78.     end;
  79.  
  80.     with TCommandButton.Create (ToolBar1) do begin
  81.         Parent := ToolBar1;
  82.         Left := 244;  Top := 0;  Width := 56;  Height := 36;
  83.         Action := OptionsAction;
  84.         Images := ToolImages;
  85.         ShowCaption := True;
  86.     end;
  87. end;
  88.  
  89. initialization
  90.     RegisterDesktopFormClass (TDummyExpert, 'DummyExpert', 'DummyExpert');
  91. end.
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.